package com.example.demo.demos.util;

public class LogConfig {
    public LogConfig() {
    }

    public static final void init(LogConfigBean logConfigBean) {
        String type = logConfigBean.getType();
        if ("".equals(type)) {
            System.out.println("crabapple日志框架启动失败，原因：日志框架未选择\n");
        } else if ("logback".equals(type)) {
            LogbackConfig.init(logConfigBean);
        } else if ("log4j2".equals(type)) {
            Log4j2Config.init(logConfigBean);
        } else {
            System.out.println("crabapple日志框架-type值错误，启用失败");
            System.out.println(logConfigBean);
        }
    }
}
